#pragma once

// CMFCVisualManagerDeviant command target


class CMFCVisualManagerDeviant : public CMFCVisualManagerOffice2007
{
	DECLARE_DYNCREATE(CMFCVisualManagerDeviant)

public:
	CMFCVisualManagerDeviant();
	virtual ~CMFCVisualManagerDeviant();

	//virtual void OnUpdateSystemColors();
	virtual COLORREF OnDrawRibbonPanel(CDC* pDC, CMFCRibbonPanel* pPanel, CRect rectPanel, CRect rectCaption);
	virtual void OnDrawRibbonCategory(CDC* pDC, CMFCRibbonCategory* pCategory, CRect rectCategory);
	virtual void OnFillBarBackground(CDC* pDC, CBasePane* pBar, CRect rectClient, CRect rectClip, BOOL bNCArea = FALSE);

	virtual COLORREF OnDrawRibbonCategoryTab(CDC* pDC, CMFCRibbonTab* pTab, BOOL bIsActive);

	void OnDrawRibbonDefaultPaneButton(CDC* pDC, CMFCRibbonButton* pButton);
	COLORREF OnFillRibbonButton(CDC * pDC, CMFCRibbonButton * pButton);


	COLORREF OnDrawMenuLabel(CDC* pDC, CRect rect);


	// Accessor functions for ribbon panel colours
	COLORREF GetClrRibbonPanelBkBottom() const { return m_clrRibbonPanelBkBottom; }
	void SetClrRibbonPanelBkBottom(COLORREF val) { m_clrRibbonPanelBkBottom = val; }
	COLORREF GetClrRibbonPanelBkTop() const { return m_clrRibbonPanelBkTop; }
	void SetClrRibbonPanelBkTop(COLORREF val) { m_clrRibbonPanelBkTop = val; }
	COLORREF GetClrRibbonPanelTextPB() const { return m_clrRibbonPanelTextPB; }
	void SetClrRibbonPanelTextPB(COLORREF val) { m_clrRibbonPanelTextPB = val; }
	COLORREF GetClrRibbonPanelCaptionTextPB() const { return m_clrRibbonPanelCaptionTextPB; }
	void SetClrRibbonPanelCaptionTextPB(COLORREF val) { m_clrRibbonPanelCaptionTextPB = val; }
	COLORREF GetClrRibbonPanelCaptionTextHighlightedPB() const { return m_clrRibbonPanelCaptionTextHighlightedPB; }
	void SetClrRibbonPanelCaptionTextHighlightedPB(COLORREF val) { m_clrRibbonPanelCaptionTextHighlightedPB = val; }

	// Ribbon menu bar background
	COLORREF GetClrRibbonBarBackground() const { return m_clrRibbonBarBackground; }
	void SetClrRibbonBarBackground(COLORREF val) { m_clrRibbonBarBackground = val; }
	COLORREF GetClrRibbonBarTextPB() const { return m_clrRibbonBarTextPB; }
	void SetClrRibbonBarTextPB(COLORREF val) { m_clrRibbonBarTextPB = val; }
	COLORREF GetClrRibbonBarTextHighlightedPB() const { return m_clrRibbonBarTextHighlightedPB; }
	void SetClrRibbonBarTextHighlightedPB(COLORREF val) { m_clrRibbonBarTextHighlightedPB = val; }


	// Ribbon category colours
	COLORREF GetClrRibbonCategoryBkBottom() const { return m_clrRibbonCategoryBkBottom; }
	void SetClrRibbonCategoryBkBottom(COLORREF val) { m_clrRibbonCategoryBkBottom = val; }
	COLORREF GetClrRibbonCategoryBkTop() const { return m_clrRibbonCategoryBkTop; }
	void SetClrRibbonCategoryBkTop(COLORREF val) { m_clrRibbonCategoryBkTop = val; }
	
	// Ribbon panel outline colour
	COLORREF GetClrRibbonPanelOutline() const { return m_clrRibbonPanelOutline; }
	void SetClrRibbonPanelOutline(COLORREF val) { m_clrRibbonPanelOutline = val; }

	// Ribbon panel label background area colour
	COLORREF GetClrRibbonPanelCaptionBk() const { return m_clrRibbonPanelCaptionBk; }
	void SetClrRibbonPanelCaptionBk(COLORREF val) { m_clrRibbonPanelCaptionBk = val; }

	// MDI Client area background
	virtual BOOL OnEraseMDIClientArea(CDC* pDC, CRect rectClient);
	COLORREF GetClrMDIClientArea() const { return m_clrMDIClientArea; }
	void SetClrMDIClientArea(COLORREF val) { m_clrMDIClientArea = val; m_bCustomMDIClientAreaClr = TRUE; }
	BOOL GetCustomMDIClientAreaClr() const { return m_bCustomMDIClientAreaClr; }
	void SetCustomMDIClientAreaClr(BOOL val) { m_bCustomMDIClientAreaClr = val; }
protected:
	// Utility fns to lighten or darken colour
	COLORREF LightenColor(long lScale, COLORREF lColor);
	COLORREF DarkenColor(long lScale, COLORREF lColor);


	// Ribbon panel colours
	COLORREF m_clrRibbonPanelBkBottom;
	COLORREF m_clrRibbonPanelBkTop;
	COLORREF m_clrRibbonPanelCaptionBk;
	COLORREF m_clrRibbonPanelTextPB;
	COLORREF m_clrRibbonPanelCaptionTextPB;
	COLORREF m_clrRibbonPanelCaptionTextHighlightedPB;
	COLORREF m_clrRibbonPanelOutline;

	// Ribbon category colours
	COLORREF m_clrRibbonCategoryBkBottom;
	COLORREF m_clrRibbonCategoryBkTop;

	// Ribbon menu bar background
	COLORREF m_clrRibbonBarBackground;
	COLORREF m_clrRibbonBarTextPB;
	COLORREF m_clrRibbonBarTextHighlightedPB;

	// MDI background colour
	BOOL m_bCustomMDIClientAreaClr;
	COLORREF m_clrMDIClientArea;
};


